public class Test1 {
    public static void main(String[] args) {
        class Student{
            String name;
            int age;
            String sex;
            int num;
            String className;
void study(){
    System.out.println("姓名："+name+",年龄："+age+",性别:"+sex+",学号："+num+",班级:"+className);
}
        }
        Student student=new Student();
        student.name="小明";
        student.age=18;
        student.sex="男";
        student.num=1001;
        student.className="23物联网2班";
        student.study();
        student.study();

    }
}
